1. Field of the Invention
The present invention relates to an image processing apparatus and to an image processing method.
2. Description of the Related Art
Digital copiers in which a color document image is read by a CCD sensor and the image is output by a digital printer have become widely available in recent years. FIG. 1 is a block diagram illustrating the configuration of a digital copier. Image data that has been input from an image scanning unit 1001 is held in a storage unit 1004 temporarily after it is subjected to scan image processing by an image processing unit 1002. When the image is printed, the image data held in the storage unit 1004 is sent to the image processing unit 1002 where it is subjected to print image processing and then to a printing unit 1003, where the image is printed.
More specifically, the image processing unit 1002 generates attribute information such as character, halftone dots or base from the input image data and stores this attribute information in the storage unit 1004. At this time the image data is subjected to processing such as filter processing, gamma processing or tone processing adaptively in accordance with the attribute information and is then stored in the storage unit 1004. Thereafter, once the image data has been stored, it is output by the printing unit 1003.
Several examples of control can be mentioned with regard to the changeover of adaptive image processing in accordance with the above-mentioned attribute information, and such control includes application of white-fill processing to white base background pixels, application of color smoothing processing to halftone-dot pixels, application of color enhancement processing to black character pixels in base background, and non-application of character color enhancement processing to character pixels in a halftone-dot background. In order for scan image processing and print image processing to achieve a high-quality image output, generating highly accurate attribute information is important.
Various methods based upon image data in real space have been proposed thus far as methods of generating the attribute information of an input image. For example, there is an image processing method which, based upon frequency components of an orthogonal transform of a block comprising a prescribed number of pixels of an input image, determines whether this block is either a character area or a halftone-dot area or the like (see the specifications of Japanese Patent Laid-Open Nos. 64-81080 and 10-108012).
Further, there is an image processing method that includes determining, for every pixel in a block, whether the pixel is a character pixel or a halftone-dot pixel or the like, utilizing the attribute of the area determined based upon the attribute information of this pixel, and correcting the attribute of the pixel (see the specification of Japanese Patent Laid-Open No. 10-283475).
However, there are some problems with the examples of prior art cited above, which will now be described. FIG. 2 is a diagram illustrating block attribute information and results of block edge detection. Shown in FIG. 2 in this example are a character block A on the base background (single-color background), a character block B on a light-color halftone-dot background, a character block C on a dark-color halftone-dot background, and results D, E, F of edge extraction in the character blocks A, B, C, respectively.
It should be noted that the light-color halftone-dot background consists of a pattern of light-color halftone dots (the halftone-dot density is low, or the density value is less than 0.5), and the dark-color halftone-dot background consists of a pattern of dark-color halftone dots (the halftone-dot density is high, or the density value is 0.5 or greater). Further, the white portions in the results D, E, F indicate strong edges and the black portions indicate weak edges.
If binarization is performed from the maximum and minimum values of pixel edge intensity using a normalization threshold value, strong high-frequency components of each block can be extracted, as shown in FIG. 2. With regard to character area A on the base background, high-frequency components are extracted from the character portion. However, with regard to character area C on the dark-color halftone-dot background, high-frequency components are extracted not only from the character portion but also from the halftone-dot portion.
On the other hand, with regard to character area B on the light-color halftone-dot background, the high-frequency components of the halftone-dot portion are weak and therefore high-frequency components are extracted only from the character portion. This is the same as in the case of the background. As a consequence, the character area on the light-color halftone-dot background and the character area on the base background cannot be distinguished from each other. That is, a problem which arises is that a character area on the light-color halftone-dot background is erroneously determined to be a character on base background.
Further, an erroneous determination also occurs with a character block containing only a very small portion of a character. FIG. 3 is a diagram illustrating an example of a small-character area on a halftone-dot background. Since a character portion 301 in this character block is very small in comparison with a halftone-dot portion 302, there are very few high-frequency components indicating the features of the character portion. Consequently, a problem which arises is that even though the area contains part of a character, the area is erroneously determined to be a halftone-dot area.
Furthermore, print image processing differs greatly between that for a character on base background and that for a character on halftone dots background. Preferably, the character on the base background is subjected to edge enhancement, and in the case of a color image, it is preferred that color processing be executed such as application of undercolor removal processing to obtain the monochrome color black. On the other hand, if the same processing is applied to a character on halftone dots background, the halftone-dot portion is enhanced by edge emphasis and moiré patterns are produced. Conversely, therefore, it is preferred that smoothing processing be executed rather than enhancement processing. Further, if undercolor removal processing is executed, the character color is enhanced excessively in comparison with the surrounding color and this gives rise to a decline in image quality such as excessive enhancement of the character. Accordingly, it is better not to execute the above-mentioned processing in the case of a character on halftone dots background.
Thus, since block attributes and pixel attributes (halftone-dot pixels, character pixels and the like) cannot be extracted accurately, appropriate print image processing cannot be executed and one problem which arises from this is a decline in print image quality.